﻿<PropertyPanels:GadgetPropertiesPanelBase x:Class="EpiDashboard.Controls.GadgetProperties.LineChartProperties"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:Controls="clr-namespace:EpiDashboard.Controls"
             xmlns:PropertyPanels="clr-namespace:EpiDashboard.Controls.GadgetProperties"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="800" Loaded="UserControl_Loaded" Style="{DynamicResource PropertiesPanelStyle}">
    <PropertyPanels:GadgetPropertiesPanelBase.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../../StyleDictionary.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </PropertyPanels:GadgetPropertiesPanelBase.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition MinWidth="400" Width=".33*" />
            <ColumnDefinition Width="30" />
            <ColumnDefinition Width=".66*" />
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <StackPanel Grid.Column="0" Grid.RowSpan="3" x:Name="panelSidebar" Background="{StaticResource PrimaryAccentColorLight}">
            <Label x:Name="lblConfigExpandedTitle" FontWeight="Light" Foreground="White" FontSize="56" Margin="0, 0, 0, 10">Line Chart</Label>

            <Controls:SettingsToggleButton x:Name="tbtnVariables" Title="Variables" Description="Select the variables for the line chart." IsChecked="True" Checked="tbtnVariables_Checked"/>
            <Controls:SettingsToggleButton x:Name="tbtnSorting" Title="Sorting and Grouping" Description="Set a sort order and create list groups." IsChecked="False" Checked="tbtnSorting_Checked"/>
            <Controls:SettingsToggleButton x:Name="tbtnDisplay" Title="Display" Description="Change display options." IsChecked="False" Checked="tbtnDisplay_Checked"/>
            <Controls:SettingsToggleButton x:Name="tbtnDisplayColors" Title="Colors and Styles" Description="Set chart colors and styles." IsChecked="False" Checked="tbtnDisplayColors_Checked"/>
            <Controls:SettingsToggleButton x:Name="tbtnDisplayLabels" Title="Labels" Description="Customize chart labels." IsChecked="False" Checked="tbtnDisplayLabels_Checked"/>
            <Controls:SettingsToggleButton x:Name="tbtnDisplayLegend" Title="Legend" Description="Set legend options." IsChecked="False" Checked="tbtnDisplayLegend_Checked"/>
            <Controls:SettingsToggleButton x:Name="tbtnFilters" Title="Filters" Description="Set data filters for this gadget." IsChecked="False" Checked="tbtnFilters_Checked"/>

        </StackPanel>
<!--Variables-->
        <!--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-->
        <!--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-->
        <!--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-->

        <StackPanel x:Name="panelVariables" Grid.Column="2" Margin="0, 0, 10, 0" Visibility="Visible">
            <Label Style="{StaticResource PropertiesHeading}" Margin="0, 0, 0, 10">Variables</Label>

            <TextBlock x:Name="tblockMainVariable">Main variable:</TextBlock>
            <ComboBox x:Name="cmbField" Width="216" HorizontalAlignment="Left" Height="28" SelectionChanged="cmbField_SelectionChanged" />
            

            <TextBlock x:Name="tblockWeightVariable" Margin="0,12,0,0">Weight:</TextBlock>
            <ComboBox x:Name="cmbFieldWeight" Width="216" HorizontalAlignment="Left" Height="28" SelectionChanged="cmbFieldWeight_SelectionChanged" />

            <TextBlock x:Name="tblockCrossTabVariable" Margin="0,12,0,0">One graph for each value of:</TextBlock>
            <ComboBox x:Name="cmbFieldCrosstab" Width="216" HorizontalAlignment="Left" Height="28" SelectionChanged="cmbFieldWeight_SelectionChanged" />

            <TextBlock x:Name="tblockSecondYAxis" Text="Second y-axis type:" Margin="0,12,0,0"  />
            <ComboBox x:Name="cmbSecondYAxis" Width="216" HorizontalAlignment="Left" Height="28" SelectedIndex="0" SelectionChanged="cmbSecondYAxis_SelectionChanged">
                <ComboBox.Items>
                    <ComboBoxItem>None</ComboBoxItem>
                    <ComboBoxItem>Single field</ComboBoxItem>
                    <ComboBoxItem>Rate per 100k population</ComboBoxItem>
                </ComboBox.Items>
            </ComboBox>

            <TextBlock x:Name="tblockSecondYAxisVariable" HorizontalAlignment="Left" TextAlignment="Center" Margin="0,12,0,0" Text="Second y-axis variable:" Visibility="Visible" />
            <ComboBox x:Name="cmbSecondYAxisVariable" Width="216" HorizontalAlignment="Left" Visibility="Visible" SelectionChanged="cmbSecondYAxisVariable_SelectionChanged" />

<!--Sorting and Grouping-->
<!--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-->

        </StackPanel>
        <StackPanel x:Name="panelSorting" Grid.Column="2"  Margin="0, 0, 10, 0" Visibility="Collapsed">
            <Label Style="{StaticResource PropertiesHeading}" Margin="0, 0, 0, 10">Sorting and Grouping</Label>

            <Label Style="{StaticResource PropertiesSubHeading}" Margin="0, 0, 0, 4">Grouping</Label>
            <Label>Stratify by:</Label>
            <ScrollViewer x:Name="scrollViewerStrataProperties" VerticalAlignment="Stretch" Height="300" >
                <StackPanel>
                    <ListBox SelectionMode="Multiple" Name="listboxFieldStrata" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SelectionChanged="listboxFieldStrata_SelectionChanged" />
                </StackPanel>
            </ScrollViewer>

            <Label Style="{StaticResource PropertiesSubHeading}" Margin="0, 30, 0, 4">Sorting</Label>
            <!--<TextBlock x:Name="tblockSortMethod">Sort Method:</TextBlock>-->
            <CheckBox x:Name="checkboxSortHighLow" Style="{StaticResource PropertiesPanelCheckbox}" Content="Sort high to low" HorizontalAlignment="Left" IsChecked="true">
                <!--<CheckBox.ToolTip>
                    <StackPanel>
                        <Label FontWeight="Bold">Sort High to Low</Label>
                        <TextBlock 
                                               Padding="10" Background="Transparent" TextWrapping="WrapWithOverflow" Width="200">
                                        Determines if the output is sorted from highest frequency to lowest frequency. If unchecked, the output
                        will be sorted alphabetically.</TextBlock>
                    </StackPanel>
                </CheckBox.ToolTip>-->
            </CheckBox>
        </StackPanel>
<!--Display-->
        <!--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-->
        <StackPanel x:Name="panelDisplay" Grid.Column="2" VerticalAlignment="Stretch" Margin="0, 0, 10, 0" Visibility="Collapsed">
            <Label Style="{StaticResource PropertiesHeading}" Margin="0, 0, 0, 10">Display</Label>

            <ScrollViewer x:Name="scrollViewerProperties" Height="480.0">
                <StackPanel>
                    <Label Style="{StaticResource PropertiesSubHeading}" Margin="0,0, 0, 10">Title and Description</Label>
                    <Label x:Name="tblockTitle" VerticalAlignment="Bottom" HorizontalAlignment="Left" Content="Gadget title:" />
                    <TextBox x:Name="txtTitle" Width="360" HorizontalAlignment="Left"></TextBox>

                    <Label x:Name="tblockDesc" VerticalAlignment="Bottom" HorizontalAlignment="Left" Content="Gadget description:" />
                    <TextBox x:Name="txtDesc" Width="360" AcceptsReturn="True" Height="128" HorizontalAlignment="Left" TextWrapping="Wrap"></TextBox>
                    <Label Style="{StaticResource PropertiesSubHeading}" Margin="0,0, 0, 10">Dimensions</Label>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition></ColumnDefinition>
                            <ColumnDefinition Width="5"></ColumnDefinition>
                            <ColumnDefinition></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <StackPanel Grid.Column="0">
                            <TextBlock x:Name="tblockWidth" HorizontalAlignment="Left" TextAlignment="Center" Text="Width:" Margin="0,12,0,0"  />
                            <TextBox x:Name="txtWidth" Text="800" TextChanged="txtWidth_TextChanged" />
                        </StackPanel>

                        <StackPanel Grid.Column="2">
                            <TextBlock x:Name="tblockHeight" HorizontalAlignment="Left" TextAlignment="Center" Text="Height:" Margin="0,12,0,0"  />
                            <TextBox x:Name="txtHeight" Text="500" TextChanged="txtHeight_TextChanged" />
                        </StackPanel>
                    </Grid>
                    <Label Style="{StaticResource PropertiesSubHeading}" Margin="0, 26, 0, 10">Output Options</Label>
                    <CheckBox x:Name="checkboxAllValues" Style="{StaticResource PropertiesPanelCheckbox}" Content="Display all list values" Visibility="Visible" IsEnabled="true" />
                    <CheckBox x:Name="checkboxCommentLegalLabels" Style="{StaticResource PropertiesPanelCheckbox}" Content="Display list labels" Visibility="Visible" IsEnabled="true" />
                    <CheckBox x:Name="checkboxIncludeMissing" Style="{StaticResource PropertiesPanelCheckbox}" Content="Include missing values" IsChecked="True" />

                    <!--<CheckBox x:Name="checkboxUsePrompts" Style="{StaticResource PropertiesPanelCheckbox}" Content="Use field prompts" Visibility="Visible" IsEnabled="true">-->
                        <!--<CheckBox.ToolTip>
                            <StackPanel>
                                <Label FontWeight="Bold">Shows labels</Label>
                                <TextBlock 
                                               Padding="10" Background="Transparent" TextWrapping="WrapWithOverflow" Width="200" >
                                    Shows field prompts instead of the field names. Not applicable to variables that are not Epi Info 7 fields.
                                        </TextBlock>
                            </StackPanel>
                        </CheckBox.ToolTip>-->
                    <!--</CheckBox>-->

                </StackPanel>
            </ScrollViewer>
        </StackPanel>
<!--Colors and Styles-->
        <!--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-->
        <StackPanel x:Name="panelDisplayColors" Grid.Column="2" VerticalAlignment="Stretch" Margin="0, 0, 10, 0" Visibility="Collapsed" >
            <Label Style="{StaticResource PropertiesHeading}" Margin="0, 0, 0, 10">Colors and Styles</Label>
            <ScrollViewer x:Name="scrollViewerPropertiesColors" Height="480.0">
                <StackPanel>
                    <CheckBox x:Name="checkboxUseRefValues" Margin="0,12,0,0" Content="Use reference values" HorizontalAlignment="Left" IsChecked="True" />
                    <CheckBox x:Name="checkboxAnnotations" Margin="0,12,0,0" Content="Show annotations" HorizontalAlignment="Left" IsChecked="False" />
                    <CheckBox x:Name="checkboxAnnotationsY2" Margin="0,12,0,0" Content="Show annotations (Y2)" HorizontalAlignment="Left" IsEnabled="False" IsChecked="False" />
                    <CheckBox x:Name="checkboxGridLines" Margin="0,12,0,0" Content="Show grid lines" HorizontalAlignment="Left" IsChecked="True" />


                    <TextBlock x:Name="tblockPalette" HorizontalAlignment="Left" TextAlignment="Center" Text="Color palette:" Margin="0,12,0,0"  />
                    <ComboBox x:Name="cmbPalette" Width="216" HorizontalAlignment="Left" SelectedIndex="12">
                        <ComboBox.Items>
                            <ComboBoxItem>Atlantic</ComboBoxItem>
                            <ComboBoxItem>Breeze</ComboBoxItem>
                            <ComboBoxItem>ComponentArt</ComboBoxItem>
                            <ComboBoxItem>Deep</ComboBoxItem>
                            <ComboBoxItem>Earth</ComboBoxItem>
                            <ComboBoxItem>Evergreen</ComboBoxItem>
                            <ComboBoxItem>Heatwave</ComboBoxItem>
                            <ComboBoxItem>Montreal</ComboBoxItem>
                            <ComboBoxItem>Pastel</ComboBoxItem>
                            <ComboBoxItem>Renaissance</ComboBoxItem>
                            <ComboBoxItem>SharePoint</ComboBoxItem>
                            <ComboBoxItem>Study</ComboBoxItem>
                            <ComboBoxItem>VibrantA</ComboBoxItem>
                            <ComboBoxItem>VibrantB</ComboBoxItem>
                            <ComboBoxItem>VibrantC</ComboBoxItem>
                        </ComboBox.Items>
                    </ComboBox>

                    <TextBlock x:Name="tblockLineType" HorizontalAlignment="Left" TextAlignment="Center" Text="Line type:" Margin="0,12,0,0" />
                    <ComboBox x:Name="cmbLineType" Width="216" HorizontalAlignment="Left" SelectedIndex="0" IsEnabled="True">
                        <ComboBox.Items>
                            <ComboBoxItem>Auto</ComboBoxItem>
                            <ComboBoxItem>Polygon</ComboBoxItem>
                            <ComboBoxItem>Smooth</ComboBoxItem>
                            <ComboBoxItem>Step</ComboBoxItem>
                        </ComboBox.Items>
                    </ComboBox>

                    <TextBlock x:Name="tblockLineThickness" HorizontalAlignment="Left" TextAlignment="Center" Text="Line thickness:" Margin="0,12,0,0"  />
                    <ComboBox x:Name="cmbLineThickness" Width="216" HorizontalAlignment="Left" SelectedIndex="1" IsEnabled="True">
                        <ComboBox.Items>
                            <ComboBoxItem>1</ComboBoxItem>
                            <ComboBoxItem>2</ComboBoxItem>
                            <ComboBoxItem>3</ComboBoxItem>
                            <ComboBoxItem>4</ComboBoxItem>
                            <ComboBoxItem>5</ComboBoxItem>
                        </ComboBox.Items>
                    </ComboBox>

                    <TextBlock x:Name="tblockLineTypeY2" HorizontalAlignment="Left" TextAlignment="Center" Text="Line type (Y2):" Margin="0,12,0,0" />
                    <ComboBox x:Name="cmbLineTypeY2" Width="216" HorizontalAlignment="Left" SelectedIndex="0" IsEnabled="False">
                        <ComboBox.Items>
                            <ComboBoxItem>Auto</ComboBoxItem>
                            <ComboBoxItem>Polygon</ComboBoxItem>
                            <ComboBoxItem>Smooth</ComboBoxItem>
                            <ComboBoxItem>Step</ComboBoxItem>
                        </ComboBox.Items>
                    </ComboBox>

                    <TextBlock x:Name="tblockLineDashTypeY2" HorizontalAlignment="Left" TextAlignment="Center" Text="Line dash style (Y2):" Margin="0,12,0,0"  />
                    <ComboBox x:Name="cmbLineDashTypeY2" Width="216" HorizontalAlignment="Left" SelectedIndex="4" IsEnabled="False">
                        <ComboBox.Items>
                            <ComboBoxItem>Dash</ComboBoxItem>
                            <ComboBoxItem>Dash Dot</ComboBoxItem>
                            <ComboBoxItem>Dash Dot Dot</ComboBoxItem>
                            <ComboBoxItem>Dot</ComboBoxItem>
                            <ComboBoxItem>Solid</ComboBoxItem>
                        </ComboBox.Items>
                    </ComboBox>

                    <TextBlock x:Name="tblockLineThicknessY2" HorizontalAlignment="Left" TextAlignment="Center" Text="Line thickness (Y2):" Margin="0,12,0,0"  />
                    <ComboBox x:Name="cmbLineThicknessY2" Width="216" HorizontalAlignment="Left" SelectedIndex="1" IsEnabled="False">
                        <ComboBox.Items>
                            <ComboBoxItem>1</ComboBoxItem>
                            <ComboBoxItem>2</ComboBoxItem>
                            <ComboBoxItem>3</ComboBoxItem>
                            <ComboBoxItem>4</ComboBoxItem>
                            <ComboBoxItem>5</ComboBoxItem>
                        </ComboBox.Items>
                    </ComboBox>
                </StackPanel>
            </ScrollViewer>
        </StackPanel>
        <!--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-->
<!--Labels-->
        <StackPanel x:Name="panelDisplayLabels" Grid.Column="2" VerticalAlignment="Stretch" Margin="0, 0, 10, 0" Visibility="Collapsed">
            <Label Style="{StaticResource PropertiesHeading}" Margin="0, 0, 0, 10">Labels</Label>
            <ScrollViewer x:Name="scrollViewerPropertiesLabels" Height="480.0">
                <StackPanel>
                    <TextBlock x:Name="tblockYAxisLabelValue" HorizontalAlignment="Left" TextAlignment="Center" Text="Y-axis label:" Margin="0,12,0,0"  />
                    <TextBox x:Name="txtYAxisLabelValue" HorizontalAlignment="Stretch" Text="Count" />

                    <TextBlock x:Name="tblockYAxisFormatString" HorizontalAlignment="Left" TextAlignment="Center" Text="Y-axis format:" Margin="0,12,0,0"  />
                    <TextBox x:Name="txtYAxisFormatString" HorizontalAlignment="Stretch" Text="" />

                    <TextBlock x:Name="tblockY2AxisLabelValue" HorizontalAlignment="Left" TextAlignment="Center" Text="Y2-axis label:" Margin="0,12,0,0"  />
                    <TextBox x:Name="txtY2AxisLabelValue" HorizontalAlignment="Stretch" />

                    <TextBlock x:Name="tblockY2AxisLegendTitle" HorizontalAlignment="Left" TextAlignment="Center" Text="Y2-axis legend title:" Margin="0,12,0,0"  />
                    <TextBox x:Name="txtY2AxisLegendTitle" HorizontalAlignment="Stretch" />

                    <TextBlock x:Name="tblockY2AxisFormatString" HorizontalAlignment="Left" TextAlignment="Center" Text="Y2-axis format:" Margin="0,12,0,0"  />
                    <TextBox x:Name="txtY2AxisFormatString" HorizontalAlignment="Stretch" Text="" />

                    <TextBlock x:Name="tblockXAxisLabelType" HorizontalAlignment="Left" TextAlignment="Center" Text="X-axis label type:" Margin="0,12,0,0"  />
                    <ComboBox x:Name="cmbXAxisLabelType" Width="216" HorizontalAlignment="Left" SelectedIndex="0" SelectionChanged="cmbXAxisLabelType_SelectionChanged">
                        <ComboBoxItem Content="Automatic"/>
                        <ComboBoxItem Content="Field Prompt"/>
                        <ComboBoxItem Content="None"/>
                        <ComboBoxItem Content="Custom"/>
                    </ComboBox>

                    <TextBlock x:Name="tblockXAxisLabelValue" HorizontalAlignment="Left" TextAlignment="Center" Text="X-axis label:" Margin="0,12,0,0" />
                    <TextBox x:Name="txtXAxisLabelValue" HorizontalAlignment="Stretch" Text=""/>

                    <TextBlock x:Name="tblockXAxisAngle" HorizontalAlignment="Left" TextAlignment="Center" Text="X-axis angle:" Margin="0,12,0,0"  />
                    <TextBox x:Name="txtXAxisAngle" HorizontalAlignment="Stretch" Text="0" />

                    <TextBlock x:Name="tblockChartTitleValue" HorizontalAlignment="Left" TextAlignment="Center" Text="Chart title:" Margin="0,12,0,0"  />
                    <TextBox x:Name="txtChartTitle" AcceptsReturn="True" TextWrapping="Wrap" HorizontalAlignment="Stretch" />

                    <TextBlock x:Name="tblockChartSubTitleValue" HorizontalAlignment="Left" TextAlignment="Center" Text="Chart subtitle:" Margin="0,12,0,0"  />
                    <TextBox x:Name="txtChartSubTitle" AcceptsReturn="True" TextWrapping="Wrap" HorizontalAlignment="Stretch" />

                </StackPanel>
            </ScrollViewer>
        </StackPanel>
<!--Legend-->
        <!--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-->
        <StackPanel x:Name="panelDisplayLegend" Grid.Column="2" VerticalAlignment="Stretch" Margin="0, 0, 10, 0" Visibility="Collapsed">
            <Label Style="{StaticResource PropertiesHeading}" Margin="0, 0, 0, 10">Legend</Label>
            <ScrollViewer x:Name="scrollViewerPropertiesLegend" Height="480.0">
                <StackPanel>
                    <CheckBox x:Name="checkboxShowLegend" Margin="0,12,0,0" Content="Show legend" HorizontalAlignment="Left" IsChecked="False" Click="checkboxShowLegend_Click" />
                    <CheckBox x:Name="checkboxShowLegendBorder" Margin="0,12,0,0" Content="Show legend border" HorizontalAlignment="Left" IsChecked="False" />
                    <CheckBox x:Name="checkboxShowVarName" Margin="0,12,0,0" Content="Show variable names" HorizontalAlignment="Left" IsChecked="False" />

                    <TextBlock x:Name="tblockLegendFontSize" HorizontalAlignment="Left" TextAlignment="Center" Text="Legend font size:" Margin="0,12,0,0"  />
                    <TextBox x:Name="txtLegendFontSize" HorizontalAlignment="Stretch" Text="12" SelectionChanged="txtLegendFontSize_SelectionChanged" />

                    <TextBlock x:Name="tblockLegendDock" HorizontalAlignment="Left" TextAlignment="Center" Text="Legend placement:" Margin="0,12,0,0"  />
                    <ComboBox x:Name="cmbLegendDock" Width="216" HorizontalAlignment="Left">
                        <ComboBox.Items>
                            <ComboBoxItem>Left</ComboBoxItem>
                            <ComboBoxItem>Right</ComboBoxItem>
                            <ComboBoxItem>Top</ComboBoxItem>
                            <ComboBoxItem>Bottom</ComboBoxItem>
                        </ComboBox.Items>
                    </ComboBox>


                    <!--<TextBlock x:Name="tblockLegendFontFamily" HorizontalAlignment="Left" TextAlignment="Center" Text="Legend font family:" Margin="0,12,0,0" />
                                            <ComboBox Width="216" x:Name="cmbFontSelector" HorizontalAlignment="Left" SelectionChanged="cmbFontSelector_SelectionChanged">
                                                <ComboBox.ItemTemplate>
                                                    <DataTemplate>
                                                        <TextBlock Text="{Binding}" FontFamily="{Binding}"/>
                                                    </DataTemplate>
                                                </ComboBox.ItemTemplate>
                                            </ComboBox>-->
                </StackPanel>
            </ScrollViewer>
        </StackPanel>
        <!--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-->
        <!--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-->
        <!--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-->
        <!--Filters-->
        <StackPanel x:Name="panelFilters" Grid.Column="2"  Margin="0, 0, 10, 0" Visibility="Collapsed">
            <Label Style="{StaticResource PropertiesHeading}" Margin="0, 0, 0, 10">Data Filters</Label>
            <Label>Note: Any filters set here are applied to this gadget only.</Label>
        </StackPanel>
        <Button Style="{StaticResource CloseButtonStyle}" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="8" Click="CloseButton_Click" />

        <DockPanel Grid.ColumnSpan="3" Grid.Row="1">
            <Button x:Name="btnCancel" DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="8" Width="134" Height="42" Click="btnCancel_Click">Cancel</Button>
            <Button x:Name="btnOK" DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="8" Width="134" Height="42" Click="btnOK_Click">OK</Button>
        </DockPanel>
    </Grid>
</PropertyPanels:GadgetPropertiesPanelBase>
